import request from '@/utils/request'
export default{
  //添加课程信息
  addCourseInfo(courseInfo){
    return request({
      url: `/edu-service/course/add`,
      method: 'post',
      data: courseInfo
    })
  },

  //获取老师列表
  getListTeacher() {
    return request({
      url: `/edu-service/teacher/findAll`,
      method: 'get'
    })
  },

  //获取课程信息
  getCourseInfo(courseId){
    return request({
      url: `/edu-service/course/getCourseInfo/${courseId}`,
      method: 'get'
    })
  },

  //更新课程信息
  updateCourseInfo(courseInfo){
    return request({
      url: `/edu-service/course/update`,
      method: 'post',
      data: courseInfo
    })
  },

  //发布课程信息
  getCoursePublishVoById(id){
    return request({
      url: `/edu-service/course/getCoursePublishVoById/${id}`,
      method: 'get'
    })
  },

  //最终发布
  publishCourseById(id) {
    return request({
      url: `/edu-service/course/publishCourse/${id}`,
      method: 'get'
    })
  },

  //获取课程列表
  getPageList(page, limit, courseQuery) {
    return request({
      url: `/edu-service/course/list/${page}/${limit}`,
      method: 'get',
      params: courseQuery
    })
  },

  //删除课程
 removeCourseById(id){
   return request({
     url: `/edu-service/course/delete/${id}`,
     method: 'delete'
   })
 }
}
